package com.tbq.game.service.activity.start

import com.tbq.game.service.R
import com.tbq.game.service.app.mvp.BaseActivity
import com.tbq.game.service.utils.ApkInfoUtil
import com.tbq.game.service.utils.L
import java.io.ByteArrayInputStream

class StartActivity : BaseActivity<StartView, StartPresenter>(R.layout.start_activity),StartView {


    override fun onInitViewsAndData() {
        supportActionBar?.hide()
        StartPresenter(this).getInfo()
    }

    override fun createPresenter(): StartPresenter {
        return StartPresenter(this)
    }
    override fun onSuccessVersion(version: String?) {
    /*    try {
            val mHashMap = ParseUpdateXml.parseXml(ByteArrayInputStream(version?.toByteArray(charset("UTF-8"))))
            val serviceCode = Integer.valueOf(mHashMap!!["version"])!!
            // 版本判断
            if (serviceCode > ApkInfoUtil.getVersionCode()) {
                //updateWindows.showContent(mHashMap)
            } else {
               // goActivity()
            }

        } catch (e: Exception) {
            e.printStackTrace()
        }*/

    }

    override fun onFailedVersion(e: Exception?) {

    }
}